<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <title>Moveable-Demo</title>
</head>
<style>
  * {
    margin: 0;
    padding: 0;
  }

  body {
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    display: grid;
    place-items: center;
  }


  .container {
    width: 50vw;
    height: 50vh;
    border: 1px solid #000;

  }


  .target {
    width: 100px;
    height: 100px;
    background-color: red;
  }
</style>

<body>
  <div class="container">

    <div class="target target1">Target-1</div>
    <div class="target target2">Target-2</div>





  </div>


  </div>

  <script src="//daybrush.com/moveable/release/latest/dist/moveable.min.js"></script>

  <script>

    const target1 = document.querySelector(`.target1`);
    const target2 = document.querySelector(`.target2`);

    const container = document.querySelector(`.container`);

    const moveable$0 = new Moveable(container, {
      target: target1,
      // dragTarget: target2,
      draggable: true,
      edgeDraggable: true,
      // throttleDragRotate: 45,
      // startDragRotate: 90,
      // throttleDrag: 2,
      // checkInput: true,
      useAccuratePosition: true,
      dragContainer: container,
      className: 'my999',
      stopPropagation: true,
      hideDefaultLines: true,
      props: {
        name: 'llq'
      },

      // origin: false,
      edge: true



      // preventRightClick: false


    });

    moveable$0.on('drag', (e) => {
      e.target.style.transform = e.transform;
    });
    moveable$0.on('dragEnd', (e) => {
      console.log('==dragEnd-e====>', e)


      // const requester = this.moveable.request("draggable");
      // requester.request({ deltaX: 10, deltaY: 10 });
      // requester.requestEnd();

    });














  </script>
</body>

</html>